﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

using CommonFunc;
using SQLExpressDAL;
using SQLExpressDAL.UsersTableAdapters;
using System.Text;
using System.Data.SqlClient;

public partial class CheckKey : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    public string CheckData()
    {
        //获取密钥Cdefine5
        SqlParameter[] paras ={ 
                new SqlParameter("@userid",SqlDbType.VarChar,30)
            };
        paras[0].Value = "AB201100103";
        //Session["userid"];

        int num = (int)SqlHelper.ExecuteScalar(CommandType.StoredProcedure, "UP_GetUserKey", paras);
        if (num == 1)
        {
            Response.Redirect("Default.aspx");
        }
        return num.ToString();
    }
}
